﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VirtualPress.Infrastructure.Entities.Entity;
using VirtualPress.Tool.Configration;
using VirtualPress.Infrastructure.Entities.Enum;
using VirtualPress.Tool.Framework;
using VirtualPress.Infrastructure.Entities.JSONModel;

namespace VirtualPress.Portal.Biz.Content
{
    public class EmailBuilder
    {
        /// <summary>
        /// 投稿成功，通知邮件
        /// </summary>
        /// <param name="articleId"></param>
        /// <returns></returns>
        public static string BuildContributeEmail(int articleId)
        {
            var article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                Periodical journal = null;
                Meeting meeting = null;
                if (article.Peri_Id > 0)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine("<p>尊敬的会员，您好！</p>");
                sb.AppendLine(String.Format("<p>您的稿件 \"{0}\"已经成功通过{1}投递至{2}</p>",
                    article.Title, SiteResource.SiteName, journal == null ? meeting == null ? "" : meeting.Name : journal.Name));
                sb.AppendLine(String.Format("<p>您的稿件代码是：{0}</p>", article.Code));
                sb.AppendLine(String.Format("<p>您也可以通过<a target=\"_blank\" href=\"http://{0}\">http://{0}</a> 登录到我们的网站以查看审稿进度以及其他信息。</p>",
                    SiteResource.Domain));
                sb.AppendLine(String.Format("<p>再次感谢您对 \"{0}\" 的支持，对{1}的支持 </p><p>With best regards</p>",
                    journal == null ? meeting == null ? "" : meeting.Name : journal.Name, SiteResource.SiteName));
                sb.AppendLine(String.Format("<p>{0} 编辑部<br /></p>", SiteResource.SiteName));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }
        /// <summary>
        /// 收到新稿件通知
        /// </summary>
        /// <param name="articleId"></param>
        /// <param name="orgType"></param>
        /// <param name="orgId"></param>
        /// <returns></returns>
        public static string BuildNewArticleIncomeEmail(int articleId, OrganizationType orgType, int orgId)
        {
            var article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                Periodical journal = null;
                Meeting meeting = null;
                if (orgType == OrganizationType.Journal)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine("<p>尊敬的期刊管理员，您好！</p>");
                sb.AppendLine(String.Format("<p>您的{0} \"{1}\"收到一份新稿件。稿件标题：\"{2}\"，稿件编号：{3}</p>",
                    orgType == OrganizationType.Journal ? "期刊" : "会议",
                    orgType == OrganizationType.Journal ? journal.Name : meeting.Name,
                    article.Title, article.Code));
                sb.AppendLine(String.Format("<p>请您尽快通过 <a target=\"_blank\" href=\"http://{0}\">{1}</a> 登录至管理中心进行编审工作。</p>",
                    orgType == OrganizationType.Journal ? SiteResource.Domain + "/workspace/console/index" : SiteResource.Domain + "/workspace/meeting/index",
                    SiteResource.SiteName));
                sb.AppendLine(String.Format("<p>再次感谢您对 {0} 的支持 </p>", SiteResource.SiteName));
                sb.AppendLine("<p>With best regards <br /></p>");
                sb.Append(String.Format("<p>{0}<br /></p>", SiteResource.SiteName));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 稿件已出版通知
        /// </summary>
        /// <param name="c"></param>
        /// <param name="organizationType"></param>
        /// <param name="meetingItemId"></param>
        /// <param name="article"></param>
        /// <returns></returns>
        public static string BuildBeenPublishEmail(int articleId, OrganizationType organizationType, int meetingItemId, Article article)
        {
            article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                Periodical journal = null;
                PeriodicalItem journalItem = null;
                Meeting meeting = null;
                //MeetingItem meetingItem = null;
                if (organizationType == OrganizationType.Journal)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                    journalItem = new PeriodicalItem().Find(article.PeriItem_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                    //meetingItem = new MeetingItem().Find(article.ConferenceItem_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine("<p>尊敬的会员，您好！</p>");
                sb.AppendLine(String.Format("<p>我们很高兴的告诉您，您的稿件 \"{0}(No.{1})\" 已经于{2} {3}成功出版了。</p>",
                   article.Title, article.Code,
                   organizationType == OrganizationType.Journal ? "《" + journal.Name + "》" : meeting.Name,
                   organizationType == OrganizationType.Journal ? "第"+journalItem.Manuscriptcode+"期" : ""));
                sb.AppendLine("<p>With best regards <br /></p>");
                sb.Append(String.Format("<p>{0} 编辑部<br /></p>",
                    organizationType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 催审
        /// </summary>
        /// <param name="articleId"></param>
        /// <param name="auditingId"></param>
        /// <param name="organizationType"></param>
        /// <param name="expertUserName"></param>
        /// <returns></returns>
        public static string BuildUrgeExamineEmail(int articleId, int auditingId, OrganizationType organizationType, string expertUserName)
        {
            var article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                Expert expert = new Expert().Find(expertUserName);
                User user = new User().Find(expertUserName);
                Periodical journal = null;
                Meeting meeting = null;
                if (organizationType == OrganizationType.Journal)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine(String.Format("<p>{0} {1}，您好！</p>", user.NickName, expert.Title));
                sb.AppendLine(String.Format("<p>我们很抱歉的打扰您<br />我们希望确认您是否正在对稿件 \"{1} （No.{2}）\" 开展专审工作。如果您太忙而无法腾出时间进行专审请尽快联系我们，我们便于安排其他专家加入专审工作。（请不要直接回复此邮件！）</p><hr />",
                   article.Title, article.Code));
                sb.AppendLine(String.Format("<ul><li>如果您已经完成了专审工作，请<a target=\"_blank\" href=\"http://{0}\">点击这里</a>来提交专审材料。</li><li>您也可以通过<a target=\"_blank\" href=\"{1}\">点击这里</a>来获取编辑部联系方式。</li><ul>",
                    SiteResource.Domain + "/home/receivepostdata?token=" +
                    EncodeByBase64.Encode(AesAlgorithm.Encrypt(new
                    {
                        ExamineId = auditingId,
                        ArticleId = article.Id,
                        expertUsername = expert
                    }.ToJson())),
                    organizationType == OrganizationType.Journal ?
                    SiteResource.Domain + "/Journals/Home/Detail/" + journal.Id :
                    SiteResource.Domain.Replace("www", meeting.ShortName)));
                sb.AppendLine("<p>非常感谢您的配合</p>");
                sb.AppendLine("<p>With best regards <br /><br /></p>");
                sb.Append(String.Format("<p>{0} 编辑部<br /></p>",
                    organizationType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 给专家发感谢审稿邮件
        /// </summary>
        /// <param name="p"></param>
        /// <param name="organizationType"></param>
        /// <param name="p_2"></param>
        /// <returns></returns>
        public static string BuildTkForExamineEmail(int articleId, OrganizationType organizationType, string expertUserName)
        {
            var article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                Expert expert = new Expert().Find(expertUserName);
                User user = new User().Find(expertUserName);
                Periodical journal = null;
                Meeting meeting = null;
                if (organizationType == OrganizationType.Journal)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine(String.Format("<p>{0} {1}，您好！</p>", user.NickName, expert.Title));
                sb.AppendLine(String.Format("<p>非常感谢您对于 \"{0} （No.{1}）\" 稿件辛勤的专审工作，您的意见将在很大程度上帮助我们。</p>",
                   article.Title, article.Code));
                sb.AppendLine("<p>With best regards <br /></p>");
                sb.Append(String.Format("<p>{0} 编辑部<br /></p>",
                    organizationType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 稿件修订通知邮件
        /// </summary>
        /// <param name="articleId"></param>
        /// <param name="orgType"></param>
        /// <param name="suggestion"></param>
        /// <returns></returns>
        public static string BuildRevisionForAuthorEmail(int articleId, OrganizationType orgType, string suggestion)
        {
            var article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                Periodical journal = null;
                Meeting meeting = null;
                if (orgType == OrganizationType.Journal)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine("<p>尊敬的会员，您好！</p>");
                sb.AppendLine(String.Format("<p>鉴于我们的专家审稿意见，您的稿件 《{0}》(No.{1}) 需要作出一些修改，请参考以下意见进行相应修改并使用我们的提供模板格式化您的稿件。当您修改完毕后请通过<a target=\"_blank\" href=\"http://{2}\">{3}稿件中心</a>提交您的修订稿。为了您的稿件能尽快出版请尽快提交您的修订稿！</p>",
                   article.Title, article.Code, SiteResource.Domain + "/workspace/member/article?type=1",
                   orgType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("<p>" + suggestion + "</p>");
                sb.AppendLine("<p>谢谢您的合作！ <br /></p>");
                sb.AppendLine("<p>With best regards. <br /></p>");
                sb.Append(String.Format("<p>{0} 编辑部<br /></p>",
                    orgType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 终审通过，录用通知邮件
        /// </summary>
        /// <param name="p"></param>
        /// <param name="organizationType"></param>
        /// <returns></returns>
        public static string BuildAcceptanceNotityEmail(int articleId, int price, OrganizationType organizationType)
        {
            var article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                Periodical journal = null;
                Meeting meeting = null;
                if (organizationType == OrganizationType.Journal)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine("<p>尊敬的会员，您好！</p>");
                sb.AppendLine(String.Format("<p>我们很高兴的通知您，您的稿件 《{0}》(No.{1}) 已经被\"{2}\"录用了。</p>",
                   article.Title, article.Code,
                   organizationType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("<p>请您尽快登陆我们的网站并再次确认您的稿件，如果您发现被录用的稿件有任何问题请尽快与我们取得联系。</p>");
                sb.AppendLine(String.Format("<p>此外，作为稿件出版。需要您支付{0}元人民币，请<a target=\"_blank\" href=\"http://{1}\">点击这里</a>查看并确认支付金额。在您支付过后，我们将尽快安排稿件出版。如您有任何疑问欢迎您向我们咨询。</p>",
                    price, SiteResource.Domain + "/workspace/member/bill"));
                sb.AppendLine("<p>谢谢您的支持与合作！ <br /></p>");
                sb.AppendLine("<p>With best regards. <br /></p>");
                sb.Append(String.Format("<p>{0} 编辑部<br /></p>",
                    organizationType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 审稿通知
        /// </summary>
        /// <param name="articleId"></param>
        /// <param name="expert"></param>
        /// <param name="organizationType"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        public static string BuildReviewNotityEmail(int articleId, int auditingId, string expertUsername, OrganizationType organizationType, string limit)
        {
            var article = new Article().Find(articleId.ToString());
            if (article != null)
            {
                string author = string.Empty;
                new ArticleAuthor().FindAll(
                    c => c.ManuscriptId == articleId).Select(c => c.AuthorName)
                    .ToList()
                    .ForEach(c => { author += c + "、"; });
                author = author.EndsWith("、") ? author.Remove(author.Length - 1) : author;
                Expert expert = new Expert().Find(expertUsername);
                User user = new User().Find(expertUsername);
                Periodical journal = null;
                Meeting meeting = null;
                if (organizationType == OrganizationType.Journal)
                {
                    journal = new Periodical().Find(article.Peri_Id.ToString());
                }
                else
                {
                    meeting = new Meeting().Find(article.Conference_Id.ToString());
                }
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("<style type=\"text/css\">");
                sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
                sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
                sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
                sb.AppendLine(".content-line-right{float: right;}");
                sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
                sb.AppendLine(".content-logo{}");
                sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
                sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
                sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
                sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
                sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
                sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
                sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
                sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
                sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
                sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
                sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
                sb.AppendLine(".content-footer-left{float: left;}");
                sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
                sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
                sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
                sb.AppendLine("</style>");
                sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
                sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
                sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
                sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
                sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
                sb.AppendLine(String.Format("<p>{0} {1}，您好！</p>",
                    user.NickName, expert.Title));
                sb.AppendLine(String.Format("<p>鉴于您在学术领域内的影响，我们非常希望您能帮助我们并参与{0}的审稿工作。</p>",
                    organizationType == OrganizationType.Journal ? "《" + journal.Name + "》" : meeting.Name + "会议"));
                sb.AppendLine(String.Format("<p>稿件编号：{0}</p>", article.Code));
                sb.AppendLine(String.Format("<p>稿件标题：{0}</p>", article.Title));
                sb.AppendLine(String.Format("<p>作者：{0}</p><hr />", author));
                sb.AppendLine(String.Format("<p>请<a href=\"http://{0}\" target=\"_blank\">点击这里</a>下载该稿件的副本。</p>",
                    SiteResource.Domain + "/download?token=" + EncodeByBase64.Encode(new
                    {
                        id = new Appendix().FindLast(c => c.RaletionId == article.Id && c.Type == (int)AttachmentType.Manuscript).Id,
                        type = 9
                    }.ToJson())));
                sb.AppendLine(String.Format("<p>如果您不愿意进行专审，请<a target=\"_blank\" href=\"http://{0}\">点击这里</a>告诉我们。</p>",
                    SiteResource.Domain + "/home/declinereview?token=" +
                        EncodeByBase64.Encode(AesAlgorithm.Encrypt(new
                        {
                            ExamineId = auditingId,
                            ArticleId = article.Id,
                            expertUsername = expertUsername
                        }.ToJson()))));
                sb.AppendLine(String.Format("<p>当您审稿完毕时，请通过<a target=\"_blank\" href=\"http://{0}\">点击这里</a>来提交您的审稿结果。</p>",
                    SiteResource.Domain + "/home/ReceivePostData?token=" +
                        EncodeByBase64.Encode(AesAlgorithm.Encrypt(new
                        {
                            ExamineId = auditingId,
                            ArticleId = article.Id,
                            expertUsername = expertUsername
                        }.ToJson()))));
                sb.AppendLine("<p>谢谢您的支持与合作！ <br /></p>");
                sb.AppendLine("<p>With best regards. <br /></p>");
                sb.Append(String.Format("<p>{0} 编辑部<br /></p>",
                    organizationType == OrganizationType.Journal ? journal.Name : meeting.Name));
                sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
                sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
                sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
                sb.AppendLine("</div></div></div></div>");
                return sb.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 邀请加入编委会
        /// </summary>
        /// <param name="taskType"></param>
        /// <param name="username"></param>
        /// <param name="orgType"></param>
        /// <param name="Name"></param>
        /// <param name="OrgId"></param>
        /// <param name="OrgItemId"></param>
        /// <returns></returns>
        public static string BuildInviteForExpertEmail(TaskType taskType, string username,
            OrganizationType orgType, string Name, int OrgId, int OrgItemId)
        {
            string agreeUrl = "http://" + SiteResource.Domain + "/Job/Item?token=" +
                EncodeByBase64.Encode(new
                {
                    Type = (int)taskType,
                    Stream = new
                    {
                        Agree = true,
                        ExpertAccount = username,
                        JournalId = OrgId,
                        JournalLeaguerId = OrgItemId
                    }.ToJson()
                }.ToJson());

            string refuseUrl = "http://" + SiteResource.Domain + "/Job/Item?token=" +
                EncodeByBase64.Encode(new
                {
                    Type = (int)taskType,
                    Stream = new
                    {
                        Agree = false,
                        ExpertAccount = username,
                        JournalId = OrgId,
                        JournalLeaguerId = OrgItemId
                    }.ToJson()
                }.ToJson());
            Expert expert = new Expert().Find(username);
            User user = new User().Find(username);

            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>" + DateTime.Now.ToString("yyyy-MM-dd") + "</p>");
            sb.AppendLine(String.Format("<p>{0} {1}，您好！</p>",
                user.NickName, expert == null ? "" : expert.Title));
            sb.AppendLine(String.Format("<p>鉴于您在学术领域内的影响，我们非常希望您能加入到 {0} 的编委会中来并帮助我们进行审稿。</p>", Name));
            sb.AppendLine(String.Format("<p>如果您有任何疑问可以通过<a target=\"_blank\" href=\"http://{0}\">点击这里</a>登陆到我们的首页来获取更多信息，这里有我们的联系方式。同时也非常欢迎您来电、来函与我们交流，沟通。</p><hr/>",
                   orgType == OrganizationType.Journal ?
                    SiteResource.Domain + "/Journals/Home/Detail/" + OrgId :
                    SiteResource.Domain.Replace("www", new Meeting().Find(OrgId.ToString()).ShortName)));
            sb.AppendLine("<p>如果您<strong style=\"color:green;\">同意</strong>并加入我们的编委会，请点击链接<a href=\"" + agreeUrl + "\">" + agreeUrl + "</a></p>");
            sb.AppendLine("<p>如果您<strong style=\"color:red;\">拒绝</strong>加入我们的编委会，请点击链接<a href=\"" + refuseUrl + "\">" + refuseUrl + "</a></p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }
        /// <summary>
        /// 欢迎加入编委会
        /// </summary>
        /// <param name="type"></param>
        /// <param name="username"></param>
        /// <param name="Name"></param>
        /// <returns></returns>
        public string BuildWelcomeToOrganizationNotityEmailBody(int type, string username,
            string Name)
        {
            string url = "http://" + SiteResource.Domain;
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>" + username + "，<br/>您好！</p>");
            sb.AppendLine("<p>欢迎您加入" + SiteResource.SiteName + "，您已经成功成为《" + Name + "》的" + (type == 0 ? "编委会成员" : "初审成员") + "</p>");
            sb.AppendLine("<p>您的登陆用户名为：" + username + "</p>");
            sb.AppendLine("<p>您可以使用如下链接登陆到我们的网站<br/><a href=\"" + url + "\">" + url + "</a></p>");
            sb.AppendLine("<p>我们欢迎您的光临!</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }
        /// <summary>
        /// 初审通过，提交专家推荐。进入终审
        /// </summary>
        /// <param name="articleTitle"></param>
        /// <param name="username"></param>
        /// <returns></returns>
        public static string BuildAcceptArticleWithCommandSheetEmail(string articleTitle, string username)
        {
            string url = "http://" + SiteResource.Domain;
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>" + username + "，<br/>您好！</p>");
            sb.AppendLine("<p>您的稿件《" + articleTitle + "》初审通过，由于您提供了专家推荐材料，已经进入终审阶段。如有疑问请与期刊方联系。</p>");
            sb.AppendLine("<p>您可以使用如下链接登陆到我们的网站，并进行后续的操作<br/><a href=\"" + url + "\">" + url + "</a></p>");
            sb.AppendLine("<p>请尽快处理!</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 初审通过，要求缴费
        /// </summary>
        /// <param name="articleTitle"></param>
        /// <param name="username"></param>
        /// <returns></returns>
        public static string BuildFirstExaminationEmail(string articleTitle, string username,bool isFee)
        {
            string url = "http://" + SiteResource.Domain;
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>" + username + "，<br/>您好！</p>");
            sb.AppendLine(String.Format("<p>您的稿件《" + articleTitle + "》初审通过{0}。如有疑问请与期刊方联系。</p>",
                isFee ? "，请尽快缴费以进行专审" : ""));
            sb.AppendLine("<p>您可以使用如下链接登陆到我们的网站，并进行后续的操作<br/><a href=\"" + url + "\">" + url + "</a></p>");
            sb.AppendLine("<p>请尽快处理!</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 初审未通过
        /// </summary>
        /// <param name="articleTitle"></param>
        /// <param name="username"></param>
        /// <param name="RefuseMessage"></param>
        /// <returns></returns>
        public static string BuildFirstExaminationNotPassEmail(string articleTitle, string username, string RefuseMessage)
        {
            string url = "http://" + SiteResource.Domain;
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>" + username + "，<br/>您好！</p>");
            sb.AppendLine(String.Format("<p>您的稿件《{0}》初审未通过，初审意见为：<br/>{1}</p>", articleTitle, RefuseMessage));
                sb.AppendLine("<p>您可以使用如下链接登陆到我们的网站，并进行后续的操作<br/><a href=\"" + url + "\">" + url + "</a></p>");
                sb.AppendLine("<p>请尽快处理!</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 注册，发送邮箱验证邮件
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        public static string BuildRegisterActivtionEmail(string userName, string token)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬的用户：" + userName + "，<br/>您好！</p>");
            sb.AppendLine("<p>欢迎您注册" + SiteResource.SiteName + "，请点击以下链接激活您的账号</p>");
            sb.AppendLine("<p><a href=\"http://" + SiteResource.Domain + "/account/activation?token=" + token + "\">http://" +
                SiteResource.Domain + "/account/activation?token=" + token + "</a></p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        public static string BuildResetPasswordEmail(string userName, string token)
        {
            string url = "http://" + SiteResource.Domain + "/account/resetpassword?token=" + token + "&u=" + EncodeByBase64.Encode(userName);
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>尊敬会员：" + userName + "，<br/>您好！</p>");
            sb.AppendLine("<p>您在" + SiteResource.SiteName + "申请了重置密码。请点击以下链接以继续您的操作：</p>");
            sb.AppendLine("<p><a href=\"" + url + "\">" + url + "</a></p>");
            sb.AppendLine("<p>如果您未申请过重置密码，请尽快<a target=\"_blank\" href=\"http://" + SiteResource.Domain + "/account/login\">登录" + SiteResource.SiteName + "</a>，并修改您的密码</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 确认加入编委会欢迎邮件
        /// </summary>
        /// <param name="organizationType"></param>
        /// <param name="Name"></param>
        /// <returns></returns>
        public static string BuildWelcomeForExpertEmail(string expertAccount, OrganizationType organizationType, string Name)
        {
            string url = "http://" + SiteResource.Domain;
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>" + expertAccount + "，<br/>您好！</p>");
            sb.AppendLine("<p>欢迎您加入" + SiteResource.SiteName + "，您已经成功成为《" + Name + "》的编委会成员</p>");
            sb.AppendLine("<p>您的登陆用户名为：" + expertAccount + "</p>");
            sb.AppendLine("<p>您可以使用如下链接登陆到我们的网站<br/><a href=\"" + url + "\">" + url + "</a></p>");
            sb.AppendLine("<p>我们欢迎您的光临!</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 新组织（期刊、会议）创建通知
        /// </summary>
        /// <param name="Name"></param>
        /// <param name="organizationType"></param>
        /// <param name="AdminAccount"></param>
        /// <returns></returns>
        public static string BuildNewOrgIsCreateEmail(string Name, OrganizationType organizationType, string AdminAccount)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine(String.Format("<p>尊敬的{0}管理员，<br/>您好！</p>",
                organizationType == OrganizationType.Journal ? "期刊" : "会议"));
            sb.AppendLine(String.Format("<p>欢迎您加入{0}，您的{1} \"{2}\" 已经创建完成。请通过如下地址登录并管理您的</p><p>{1}</p>",
                SiteResource.SiteName, organizationType == OrganizationType.Journal ? "期刊" : "会议", Name));
            sb.AppendLine(String.Format("<a href=\"http://{0}\">http://{0}</a>",
                SiteResource.Domain+ (organizationType == OrganizationType.Journal? "/wrokspace/console/index":"/workspace/meeting/index")));
            sb.AppendLine("<p>您的登陆用户名为：" + AdminAccount + "</p>");
            sb.AppendLine("<p>登录密码为 123456</p>");
            sb.AppendLine("<p>请您尽快登录并修改您的密码，我们欢迎您的光临!</p>");
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 取消专家专审资格邮件
        /// </summary>
        /// <param name="name"></param>
        /// <param name="organizationType"></param>
        /// <param name="articleTitle"></param>
        /// <returns></returns>
        public static string BuildCacnelExamineEmail(string name, OrganizationType organizationType, string articleTitle)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("\"{0}\" 管理员取消您对于稿件《{1}》的专审任务。如有疑问请尽快与{2}方联系。",
                name, articleTitle, organizationType == OrganizationType.Journal ? "期刊" : "会议"));
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 专审通过，进入终审通知
        /// </summary>
        /// <param name="articleName"></param>
        /// <returns></returns>
        public static string BuildZhuanShenFinishEmail(string articleTitle)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("<p>您的稿件《{0}》已经通过管理员验收并进入终审阶段。如有疑问请尽快与期刊方联系。</p>", articleTitle));
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        /// <summary>
        /// 专审不通过，通知邮件
        /// </summary>
        /// <param name="articleTitle"></param>
        /// <param name="suggestion"></param>
        /// <returns></returns>
        public static string BuildZhuanShenRefuseEmail(string articleTitle, string suggestion)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("<p>您的稿件《{0}》专审不通过。</p><p>{1}</p>", articleTitle, suggestion));
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }

        public static string BuildZhongShenRefuseEmail(string articleTitle,string message)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("<style type=\"text/css\">");
            sb.AppendLine(".content{margin-left: auto;margin-right: auto;width: 700px;margin-top: 20px;line-height:160%;}");
            sb.AppendLine(".content-line{overflow: hidden;width: 100%;}");
            sb.AppendLine(".content-line-left{float: left;overflow: hidden;}");
            sb.AppendLine(".content-line-right{float: right;}");
            sb.AppendLine(".content-line-vspace{float: left;width: 15px;overflow: hidden;height: 1px;}");
            sb.AppendLine(".content-logo{}");
            sb.AppendLine(".content-topright{margin-top: 35px;margin-right: 5px;}");
            sb.AppendLine(".content-topright a{color: #333;text-decoration: none;}");
            sb.AppendLine(".content-topright span{color: #E1E1E1;padding: 0 5px;}");
            sb.AppendLine(".hline{overflow: hidden;height: 15px;width: 100%;margin-top: 4px;border-top: 1px solid #fafafa;}");
            sb.AppendLine(".content-toprighttext{padding-top: 15px;}");
            sb.AppendLine(".box{overflow: hidden;margin-left: auto;margin-right: auto;border-right: 1px solid #F0F6FA;border-bottom: 1px solid #F0F6FA;padding: 0 1px 1px 0;background-color: #E0ECF5;color: #4f4e4e;	padding-bottom: 1px;padding-right:1px;}");
            sb.AppendLine(".boxbg{background-color: #F9FCFD;border: 1px solid #BDC8D9;padding-left:20px;padding-right:20px;padding-top:10px;padding-bottom:20px;}");
            sb.AppendLine(".box-title{padding: 15px 10px 5px 10px;border-bottom: 1px solid #F3F3F3;margin-bottom: 5px;}");
            sb.AppendLine(".box-line{overflow: hidden;padding: 5px 10px 5px 10px;}");
            sb.AppendLine(".box-dotline{overflow: hidden;width: 755px;height: 5px;border-bottom: dotted 1px #b3b5b5;margin-left: auto;margin-right: auto;}");
            sb.AppendLine(".content-footer{border-top: 1px solid #F3F3F3;line-height: 1.8em;padding: 18px 0;color: #999;clear: both;margin-top: 20px;font-size:13px;}");
            sb.AppendLine(".content-footer-left{float: left;}");
            sb.AppendLine(".content-footer-left span{color: #999;padding: 0 5px;}");
            sb.AppendLine(".content-footer-left a{color: #666;text-decoration: none;}");
            sb.AppendLine(".content-footer-right{float: right;text-align: right;}");
            sb.AppendLine("</style>");
            sb.AppendLine("<div class=\"content\"><div class=\"content-line\"><div class=\"content-line-left\"><div class=\"content-logo\">");
            sb.AppendLine("<img src=\"http://" + SiteResource.Domain + SiteResource.Logo + "\" /></div>");
            sb.AppendLine("</div><div class=\"content-line-right\"><div class=\"content-toprighttext\"></div>");
            sb.AppendLine("</div></div><div class=\"hline\"></div><div class=\"content-line\"><div class=\"box\"><div class=\"boxbg\">");
            sb.AppendLine("<p>您好！</p>");
            sb.AppendLine(String.Format("<p>您的稿件《{0}》终审不通过。</p><p>{1}</p>", articleTitle, message));
            sb.AppendLine("</div></div></div><div class=\"content-line\"><div class=\"content-footer\"><div class=\"content-footer-left\">");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/about\" target=\"_blank\">关于我们</a><span>|</span><a href=\"http://" + SiteResource.Domain + "/home/contact\" target=\"_blank\">联系我们</a><span>|</span>");
            sb.AppendLine("<a href=\"http://" + SiteResource.Domain + "/home/business\" target=\"_blank\">商务合作</a><span>|</span><br/>");
            sb.AppendLine("地址：" + SiteResource.CompanyAddress + "&nbsp;&nbsp;电话：" + SiteResource.CompanyPhone);
            sb.AppendLine("</div></div></div></div>");
            return sb.ToString();
        }
    }
}
